package org.alino.core.shiro.model;

import org.alino.core.utils.LoggerUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.BeansException;

import java.io.Serializable;

/**
 * @Desc TODO
 * @Author by Brant
 * @Date 2017/4/10
 */
public class UserBase implements Serializable {
    private Long id;
    private String mobile;
    private String wechat;
    private String nickname;
    private String password;
    private String salt;
    private String userAgent;
    private String status;

    public UserBase() {
    }

    public UserBase(UserBase user) {
        try{
            BeanUtils.copyProperties(user,this);
        }catch (BeansException ex){
            LoggerUtils.error(getClass(),ex.getMessage());
        }
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getWechat() {
        return wechat;
    }

    public void setWechat(String wechat) {
        this.wechat = wechat;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getUserAgent() {
        return userAgent;
    }

    public void setUserAgent(String userAgent) {
        this.userAgent = userAgent;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
